/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllerm;

/**
 *
 * @author Andreea
 */

public class Controller {
    //singleton class
    private Controller(){}
    private static class SingletonHolder { 
        private static final Controller INSTANCE = new Controller();
    }
    
    public static Controller getInstance() {
        return SingletonHolder.INSTANCE;
    }
    


    /*private static long login(java.lang.String username, java.lang.String password) {
        services.UserWebService_Service service = new services.UserWebService_Service();
        services.UserWebService port = service.getUserWebServicePort();
        return port.login(username, password);
    }*/
    /*public long userLogin(String username, String password){
        return this.login(username, password);
        
    }*/

    public static void addDoctor(java.lang.String name, java.lang.String specialty, java.lang.String username, java.lang.String password) {
        services.UserWebService_Service service = new services.UserWebService_Service();
        services.UserWebService port = service.getUserWebServicePort();
        port.addDoctor(name, specialty, username, password);
    }

    public static long login(java.lang.String username, java.lang.String password) {
        services.UserWebService_Service service = new services.UserWebService_Service();
        services.UserWebService port = service.getUserWebServicePort();
        return port.login(username, password);
    }

  

   
    
}
